<?php
/**
 * Created by PhpStorm.
 * User: zd
 * Date: 2018/10/12
 * Time: 10:28
 */

namespace app\api\model;


class WorkAgent extends BaseModel
{

    /**
     * 更具id获取agent详情
     * @param $id
     * @return array|false|\PDOStatement|string|\think\Model
     */
    public static function getAgent($id){
        return self::where('id','=',$id)->find();
    }

    /**
     * 取消授权时删除授权细信息
     * @param $w_id
     * @param $suitID
     * @return int
     */
    public static function deleteAgents($w_id,$suitID)
    {
        return self::where('w_id','=',$w_id)
            ->where('suitID','=',$suitID)
            ->delete();
    }

}